﻿using Base.FileModel.DB;
using WeDonekRpc.Helper.IdGenerator;
using WeDonekRpc.SqlSugar;

namespace Base.FileDAL.Repository
{
    internal class UserPdfFileDAL : BasicDAL<DBUserPdfFile, long>, IUserPdfFileDAL
    {
        public UserPdfFileDAL ( IRepository<DBUserPdfFile> basicDAL ) : base(basicDAL)
        {
        }
        public void Add ( long fileId, long pdfFileId )
        {
            DBUserPdfFile db = new DBUserPdfFile
            {
                Id = IdentityHelper.CreateId(),
                FileId = fileId,
                PdfFileId = pdfFileId
            };
            base._BasicDAL.Insert(db);
        }
    }
}
